dnd: Remove gdk_content_provider_new_with_callback()
authorBenjamin Otte <otte@redhat.com>
Sun, 16 Feb 2020 15:22:37 +0000 (16:22 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 16 Feb 2020 19:10:31 +0000 (20:10 +0100)
commitda83457a60b4a1f375efb14f06f6be7c45ea0128
tree52b4a7c07bc583d1a6f85e3d0d9c234f138a0807
parentdbad4404680204923df9abaa37ff077d1e350294
dnd: Remove gdk_content_provider_new_with_callback()

Content providers are meant to be immutable, apart from very special
cases, but in those cases they need to emit
gdk_content_provider_content_changed().

Having a constructor that just uses a get_func invites abuse of this
by not making developers aware of those requirments.
In fact, all users in GTK failed to do this.

Instead, code should use the GtkDragSource::prepare signal to create
content providers when needed.

The same problem exists with gdk_content_provider_new_with_formats(),
but this commit doesn't touch that.
demos/gtk-demo/clipboard.c
demos/icon-browser/iconbrowserwin.c
gdk/gdkcontentproviderimpl.c
gdk/gdkcontentproviderimpl.h
gtk/gtkcolorbutton.c
gtk/gtkcolorswatch.c